package org.ws.edu.task3.model;

import java.io.Serializable;

import org.apache.log4j.Logger;

public class Answer implements Serializable, Cloneable {
    private static Logger logger = Logger.getLogger(Answer.class);
    private String name = null;
    private Double factor = null;

    @Override
    public Answer clone() {
        Answer a = null;
        try {
            a = (Answer) super.clone();
        } catch (CloneNotSupportedException e) {
            logger.warn("Not supported clone", e);
        }
        return a;
    }

    public Answer(String name, Double factor) {
        this.name = name;
        this.factor = factor;
    }

    public double getFactor() {
        return factor;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setFactor(Double factor) {
        this.factor = factor;
    }

    @Override
    public String toString() {
        return "Answer [factor=" + factor + ", name=" + name + "]";
    }

}
